package exsun.jt808.data.config.jt809;

/**
 * @Author: 何蓉
 * @Date: 2019/4/10 14:10
 * @Description: 车辆信息转发报警类型
 */
public class VehicleExgMsgConstants {

    public static final String REPORT_TYPE_REPORT_ALARM_INFO = "上报报警信息消息";

    public static final String REPORT_TYPE_APLLY_HIS_GNSSDATA_REQ = "补报车辆定位信息请求";

    public static final String REPORT_TYPE_APPLY_MONITOR_STARTUP = "申请交换指定车辆定位信息";

    public static final String REPORT_TYPE_APPLY_MONITOR_END = "取消交换指定车辆定位信息";

    /**
     * 补发车辆定位信息请求响应结果
     */
    public static String applyForHisGnssDataResult(int resultCode) {
        String result = null;
        if (resultCode == 0) {
            result = "成功，上级平台即可补发";
        } else if (resultCode == 1) {
            result = "成功，上级平台择机补发";
        } else if (resultCode == 2) {
            result = "失败，上级平台无对应的申请的定位数据";
        } else if (resultCode == 3) {
            result = "失败，申请内容不正确";
        } else if (resultCode == 4) {
            result = "其他原因";
        }
        return result;
    }

    /**
     * 申请交换指定车辆定位信息响应结果
     */
    public static String applyForMonitorStartup(int resultCode) {
        String result = null;
        if (resultCode == 0) {
            result = "申请成功";
        } else if (resultCode == 1) {
            result = "上级平台没有该车数据";
        } else if (resultCode == 2) {
            result = "申请时间段错误";
        } else if (resultCode == 3) {
            result = "其他";
        }
        return result;
    }

    /**
     * 取消交换指定车辆定位信息响应结果
     */
    public static String applyForMonitorEnd(int resultCode) {
        String result = null;
        if (resultCode == 0) {
            result = "取消申请成功";
        } else if (resultCode == 1) {
            result = "之前没有对应的申请信息";
        } else if (resultCode == 2) {
            result = "其他";
        }
        return result;
    }
}
